package com.aistar.service.resume.impl;

import com.aistar.mapper.AwardMapper;
import com.aistar.mapper.EducationMapper;
import com.aistar.mapper.InternMapper;
import com.aistar.mapper.ProjectMapper;
import com.aistar.model.entity.Award;
import com.aistar.model.entity.Education;
import com.aistar.model.entity.Intern;
import com.aistar.model.entity.Project;
import com.aistar.service.resume.ILoadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class LoadServiceImpl implements ILoadService {

    @Autowired
    private EducationMapper educationMapper;
    @Autowired
    private InternMapper internMapper;
    @Autowired
    private ProjectMapper projectMapper;
    @Autowired
    private AwardMapper awardMapper;


    @Override
    public Education loadEducationByEducationId(Integer educationId) {
        return educationMapper.findById(educationId);
    }

    @Override
    public Intern loadInternByInternId(Integer internId) {
        return internMapper.findById(internId);
    }

    @Override
    public Project loadProjectByProjectId(Integer projectId) {
        return projectMapper.fingById(projectId);
    }

    @Override
    public Award loadAwardByAwardId(Integer awardId) {
        return awardMapper.findById(awardId);
    }
}
